home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Languages
/
MacMETH 3.2.3
/
MEdit ƒ
/
Macros ƒ
/
MacroEBNF
< prev
next >
Wrap
Text File
|
1995-12-13
|
2KB
|
69 lines
numDigit "0"|"1"|"2"|"3"|"4"|"5"|"6"|"7"|"8"|"9".
number numDigit{numDigit}.
specChar "\n"|"\t"|"\b"|"\N"|"\T"|"\B"|("\"number)|'\"'|"\\".
string '"'{character|specChar} {character|specChar} '"'.
metaChar "."|":"|"$"|"<"|">"|"["|"]".
numVar "#" (numDigit | ("(" numExpr ")")).
strVar "$" (numDigit | ("(" numExpr ")")).
numVal number| numVar| numFunction| (("L"|C"|"S") metaChar).
term numVal {("*"|"/"|"MOD") numVal}.
numExpr ["+"|"-"] term {("+"|"-") term}.
numFun0 "ABSPOS"|"SCRH"|"SCRW".
numFun1 ("LEN"|"ORD"|"VAL") "(" strVal ")".
highNumFun ("STRCMP"|"STRPOS") "(" strVal "," strVal "," numExpr ")".
numFunction numFun0| numFun1| highNumFun.
strVal string| strVar| strFunction.
strFun0 "$S"|"DATE"|"TIME"|"WNAME".
strFun1 (("CHR"|"GETSTR"|"STR") "(" numExpr ")") |
(("CAP"|"DECAP") "(" strVal ")").
highStrFun strCmpCmd| subStrCmd| concatCmd.
strCmpCmd "STRCMP" "(" strVal "," strVal "," numExpr ")".
subStrCmd "SUBSTR" "(" strVal "," numExpr "," numExpr ")".
concatCmd "CONCAT" "(" strVal {"," numExpr} ")".
strFunction strFun0| strFun1| highStrFun.
boolFun0 "OPEN".
boolFun1 (("SECT"|"SELABS"|"WINDOW") "(" numExpr ")") |
(("FIND"|"OPEN"|"SAVEAS"|"QSAVAS") "(" strVal ")").
highBoolFun promptCmd|putStrCmd.
promptCmd "PROMPT" "(" strVal "," (numVar|strVar) ")".
putStrCmd "PUTSTR" "(" numExpr "," strVal ")".
boolFunction boolFun1| boolFun1| highBoolFun.
numComp numExpr ("="|"<"|">") numExpr.
boolVal ["NOT"] (numComp| boolFunction).
boolExpr boolVal {("AND"|"OR") boolVal}.
controlCmd ifCmd| whileCmd| callCmd.
ifCmd "IF" boolExpr command [ELSE command].
whileCmd "WHILE" boolExpr command.
callCmd "CALL" "(" numExpr ")".
block "{" command {";" command} "}".
cmd0 "APPEND"|"BEEP"|"CLEAR"|"CLOSE"|"COPY"|"CUT"|"DROP"|"KEYCOD"|"NEW"|
"OPEN"|"PASTE"|"POP"|"PRINT"|"PUSH"|"SAVE"|"SAVEAS".
cmd1 (("SECT"|"SELABS"|"WINDOW") "(" numExpr ")") |
(("ALERT"|"FIND"|"INSERT"|"OPEN"|"QSAVAS"|"SAVEAS") "(" strVal ")").
highCmd eAlertCmd|placeWCmd|promptCmd|putStrCmd|selectCmd|setCmd.
eAlertCmd "EALERT" "(" strVal "," strVal ")".
placeWCmd "PLACEW" "(" numExpr "," numExpr "," numExpr "," numExpr ")".
promptCmd see above
putStrCmd see above
selectCmd "SELECT" "(" numExpr "," numExpr ["|" numExpr "," numExpr] ")" ["!"].
setCmd "SET" "(" (numVar "," numExpr)| (strVar "," strVal) ")".
command (controlCmd| cmd0| cmd1| highCmd| block).
macro ["!"] [string] [number] ["(" number "," number ")"] ["•"] block.
macrofile macro {";" macro} ".".